#!/usr/bin/env python
# -*- coding: utf-8 -*-

import focus
from PySFML import *

class Page:
    def __init__(self, rect, child):
        self.child = child
        child.parent = self
        
        self.rect = rect
    
    def compute(self):
        self.child.compute(self.rect)
        self.focused = self.child.focus()
    
    def draw(self, window):
        self.child.draw(window)
    
    def process_event(self, event):
        #if event.Type == sf.Event.KeyPressed:
        #    if event.Key.Code == sf.Key.Down:
        #        new_focused = focus.next_down(self.child, self.focused)
        #        self.focused.blur()
        #        self.focused = new_focused.focus()
        pass
